package com.xhl.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xhl.dao.ICategoryDao;
import com.xhl.vo.CategoryVO;
import com.xhl.vo.Pager;

@Service
public class CategoryService implements ICategoryDao {

    @Autowired
    ICategoryDao iCategoryDao;

    @Override
    public List<CategoryVO> queryCategory(Pager<?> p) {
        return iCategoryDao.queryCategory(p);
    }

    @Override
    public long count() {
        return iCategoryDao.count();
    }

    @Override
    public long queryMax() {
        return iCategoryDao.queryMax();
    }

    @Override
    public void addCategory(String name) {
        iCategoryDao.addCategory(name);
    }

    @Override
    public void deleteCategory(String cid) {
        iCategoryDao.deleteCategory(cid);
    }

    @Override
    public void updateCategory(CategoryVO cvo) {
        iCategoryDao.updateCategory(cvo);
    }

    @Override
    public List<CategoryVO> queryCategoryAll() {
        return iCategoryDao.queryCategoryAll();
    }


}
